package com.cskaoyan.mapper;

import com.cskaoyan.model.bean.Goods;
import com.cskaoyan.model.bean.GoodsExample;


import com.cskaoyan.model.vo.foodvo.FootVo;
import com.cskaoyan.model.vo.searchvo.FilterCategory;
import com.cskaoyan.model.vo.searchvo.GoodsVo;

import com.cskaoyan.model.vo.statictial.OrderGoodsRowsBean;


import org.apache.ibatis.annotations.Param;

import java.util.ArrayList;
import java.util.List;

public interface GoodsMapper {
    long countByExample(GoodsExample example);

    int deleteByExample(GoodsExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Goods record);

    int insertSelective(Goods record);

    List<Goods> selectByExampleWithBLOBs(GoodsExample example);

    List<Goods> selectByExample(GoodsExample example);

    Goods selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Goods record, @Param("example") GoodsExample example);

    int updateByExampleWithBLOBs(@Param("record") Goods record, @Param("example") GoodsExample example);

    int updateByExample(@Param("record") Goods record, @Param("example") GoodsExample example);

    int updateByPrimaryKeySelective(Goods record);

    int updateByPrimaryKeyWithBLOBs(Goods record);

    int updateByPrimaryKey(Goods record);


    int goodsCount();

    int selectNumByKeyword(String keyword, Integer limit, String sort, String order);

    ArrayList<GoodsVo> selectGoodsByKeyword(String keyword, Integer limit, String sort, String order);

    List<Integer> selectCategoryIdByKeyword(String keyword, Integer limit, String sort, String order);

    FilterCategory selectAllById(Integer id);

    int selectNumByKeywordAndCategoryId(String keyword, Integer limit, String sort, String order, Integer categoryId);

    ArrayList<GoodsVo> selectGoodsByKeywordAndCategoryId(String keyword, Integer limit, String sort, String order, Integer categoryId);

    void insertHistory(int id, String keyword);

    List<String> selectAllKeywordById(int id);

    void deleteHistory(int id);

    FootVo selectGoodsById(Integer goodsId);

}